package com.bugsnag.ohos;

/**
 * UserState
 *
 * @since 2021-07-02
 */
public class UserState extends BaseObservable {
    User user;

    /**
     * constructor
     *
     * @param user
     */
    public UserState(User user) {
        setUser(user);
        emitObservableEvent();
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    void emitObservableEvent() {
        updateState(new StateEvent.UpdateUser(user));
    }
}
